<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: HP
  Date: 2020-07-31
  Time: 13:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <meta charset="UTF-8">
    <title>管理员中心</title>
    <link rel="stylesheet" type="text/css" href="css/common.css" />
    <link rel="stylesheet" type="text/css" href="css/main.css" />
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>

    <script type="text/javascript">
        function showPic(e, sUrl) {
            var x, y;
            x = e.clientX;
            y = e.clientY;
            document.getElementById("Layer1").style.left = x + 2 + 'px';
            document.getElementById("Layer1").style.top = y + 2 + 'px';
            document.getElementById("Layer1").innerHTML = "<img border='0' src=\"" + sUrl + "\">";
            document.getElementById("Layer1").style.display = "";
        }
        function hiddenPic() {
            document.getElementById("Layer1").innerHTML = "";
            document.getElementById("Layer1").style.display = "none";
        }
    </script>
    <%request.setCharacterEncoding("utf-8");%>

</head>
<body>
<div class="topbar-wrap white">
    <!--<div class="topbar-inner clearfix">-->
    <div class="topbar-logo-wrap clearfix">
        <h1 class="topbar-logo none">
            <a href="index.html" class="navbar-brand">管理员中心</a>
        </h1>
    </div>
</div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li><a href="#"><i class="icon-font">&#xe003;</i>图书管理</a>
                    <ul class="sub-menu">
                        <li><a href="BookList.jsp"><i class="icon-font">&#xe008;</i>图书列表</a></li>
                    </ul></li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list">
                <i class="icon-font"></i><a href="#" color="#white">商品页面结算</a><span
                    class="crumb-step"></span><span class="crumb-name"></span>
            </div>
        </div>
                <div class="search-wrap">
                    <div class="search-content">
                        <form action="/BookManage/queryBook" method="post" accept-charset="utf-8">
                            <table class="search-tab">
                                <tr>
                                    <th width="70">收货地址</th>
                                    <td><input class="common-text" placeholder="关键字" value=""
                                               id="site" type="text" name="name" /></td>
<%--                                    <td><input class="btn btn-primary btn2" value="查询"--%>
<%--                                               type="submit" onclick="sel()" /></td>--%>
                                </tr>
                            </table>
                        </form>
                    </div>
                </div>
        <div class="result-wrap">
                <div class="result-content">
                    <!-- 用于显示悬浮的图片 -->
                    <div id="Layer1" style="display: none; position: absolute; z-index: 30;"></div>
                    <!-- <a href="" ></a> -->
                    <table class="result-tab" width="100%">
                        <tr>
                            <th>序号</th>
                            <th>图书名称</th>
                            <th>图书价格</th>
                            <th>图书类型</th>
                            <th>出版时间</th>
                            <th>购买数量</th>
                            <th>小计</th>
                        </tr>

                        <c:forEach items="${list}" var="cart">
                            <tr>
                                <td>${cart.bookInfo.id}</td>
                                <td onmouseout="hiddenPic();" onmousemove="showPic(event,'images/book_img/${cart.bookInfo.imgUrl}');">
                                    ${cart.bookInfo.bookName}
                                </td>
                                <td class="unit">${cart.bookInfo.price}</td>
                                <c:forEach items="${typeList}" var="typeList">
                                    <c:if test="${typeList.typeId==cart.bookInfo.typeId}">
                                        <td>${typeList.typeName}</td>
                                    </c:if>
                                </c:forEach>
                                <td>${cart.bookInfo.bornDate}</td>
                                <td class="quantity">
                                    ${cart.amount}
                                </td>
                                <td class="price">${cart.total}</td>
                            </tr>
                        </c:forEach>

                        <tr>
                            <td colspan="6" style="text-align: right">总计：<span style="color: red" class="sum"></span></td>
                            <td style="color: red"><button type="submit" onclick="site()">支付</button></td>
                        </tr>
                    </table>
                </div>
        </div>
    </div>
    <!--/main-->
</div>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>
<script src="js/closeCart.js"></script>
</body>
</html>
